package com.tdk.bts.util;

public class StringUtil {
	
	private static final String DEFAULT_PATTERN = ",";


	public static String arr2String(Object[] arr)
	{
		return arr2String(arr, DEFAULT_PATTERN);
	}
	
	public static String arr2String(Object[] arr,String pattern)
	{
		if(arr == null)
		{
			return "";
		}
		StringBuffer temp =new StringBuffer();
		for (Object t : arr) {
			temp.append(t + pattern);
		}
		
		temp.delete(temp.length()-pattern.length(), temp.length());
		return temp.toString();
	}
	
}
